package cn.mianshiyi.monitor;


import java.util.Random;

/**
 * @author shangqing.liu
 */
public class MonitorExample {

    public static void main(String[] args) {
        new Thread(() -> {
            for (int i = 0; i < 1000000; i++) {
                int i1 = new Random().nextInt(100);
                // 记录耗时
                Monitor.record("test111", i1);
                // 记录1次数
                Monitor.record("test2");
                try {
                    Thread.sleep(i1);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        }).start();
    }
}
